package cn.qidd.keep.manage.service.system;

import cn.qidd.keep.domain.web.BusinessException;
import cn.qidd.keep.manage.model.system.JobModel;
import cn.qidd.keep.manage.model.system.JobParams;
import cn.qidd.keep.manage.model.system.TriggerModel;
import cn.qidd.keep.manage.model.system.TriggerParams;
import org.quartz.SchedulerException;

import java.util.List;

/**
 * Created by sunyanping on 2018/10/31
 */
public interface TaskService {

    List<JobModel> findAllJob() throws SchedulerException;

    void updateJob(JobParams params) throws SchedulerException;

    void pauseJob(JobParams params) throws SchedulerException;

    void resumeJob(JobParams params) throws SchedulerException;

    void deleteJob(JobParams params) throws SchedulerException;

    void runJob(JobParams params) throws SchedulerException;

    List<TriggerModel> getAllTriggerOfJob(String jobName, String jobGroup) throws SchedulerException, BusinessException;

    void addTrigger(TriggerParams params) throws BusinessException, SchedulerException;

    void deleteTrigger(TriggerParams params) throws BusinessException, SchedulerException;

    void pauseTrigger(TriggerParams params) throws SchedulerException;

    void resumeTrigger(TriggerParams params) throws SchedulerException;
}
